package com.crm.service.opportunityManager;

import com.crm.model.entity.opportunityManager.OpportunityGift;

import java.util.List;

/**
 * 商机赠品
 */
public interface OpportunityGiftDbService {

    /**
     * 商机-新增商机-查询商机下的赠品
     * @param opportunityId 商机id
     * @param order 分组
     * @return
     */
    List<OpportunityGift> opportunityGiftList(String opportunityId, String order);

    /**
     * 商机管理-新增商机赠品
     * @param opportunityGift 商机赠品实体
     * @return
     */
    Boolean addOpportunityGift(OpportunityGift opportunityGift);

    /**
     * 商机-商机详情-修改商机赠品回显
     * @param opportunityGiftId 商机赠品id
     * @return
     */
    OpportunityGift getOpportunityGiftById(String opportunityGiftId);

    /**
     * 商机管理-修改商机赠品
     * @param opportunityGift 商机赠品实体
     * @return
     */
    Boolean updateOpportunityGift(OpportunityGift opportunityGift);

    /**
     * 商机详情-赠品查重
     * @param giftCode 赠品编码
     * @param opportunityId 商机id
     * @return
     */
    List<OpportunityGift> opportunityCodeAndOppIdList(String giftCode, String opportunityId);
}
